<template>
    <div class="loading">
        <img src="../assets/loadingImg.gif" alt="">
        <div class="text" v-if="loadingText">
            {{loadingText}}
        </div>
    </div>
</template>

<script>
import {mapGetters} from "vuex";
export default {
    name:"loading",
    computed:{
        ...mapGetters(["loadingText"])
    }
}
</script>

<style lang="scss" scoped>
    .loading{
        width: 90px;
        height: 90px;
        background-color: rgba(0, 0, 0, 0.3);
        border-radius: 5px;
        font-size: 12px;
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        align-items: center;
        position: fixed;
        z-index: 9999;
        left: 50%;
        top: 50%;
        transform: translate(-50%,-50%);
        color: white;
        >img{
            width: 35px;
            height:35px;
        }
    }
</style>
